Mercurial > hg > CbC > CbC_llvm
comparison lib/MC/ConstantPools.cpp @ 147:c2174574ed3a
LLVM 10
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 16:55:33 +0900 |
parents | 803732b1fca8 |
children |
comparison
equal
deleted
inserted
replaced
134:3a76565eade5 | 147:c2174574ed3a |
---|---|
1 //===- ConstantPools.cpp - ConstantPool class -----------------------------===// | 1 //===- ConstantPools.cpp - ConstantPool class -----------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 // | 4 // See https://llvm.org/LICENSE.txt for license information. |
5 // This file is distributed under the University of Illinois Open Source | 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 // License. See LICENSE.TXT for details. | |
7 // | 6 // |
8 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
9 // | 8 // |
10 // This file implements the ConstantPool and AssemblerConstantPools classes. | 9 // This file implements the ConstantPool and AssemblerConstantPools classes. |
11 // | 10 // |
95 } | 94 } |
96 } | 95 } |
97 | 96 |
98 void AssemblerConstantPools::emitForCurrentSection(MCStreamer &Streamer) { | 97 void AssemblerConstantPools::emitForCurrentSection(MCStreamer &Streamer) { |
99 MCSection *Section = Streamer.getCurrentSectionOnly(); | 98 MCSection *Section = Streamer.getCurrentSectionOnly(); |
100 if (ConstantPool *CP = getConstantPool(Section)) { | 99 if (ConstantPool *CP = getConstantPool(Section)) |
101 emitConstantPool(Streamer, Section, *CP); | 100 emitConstantPool(Streamer, Section, *CP); |
102 } | |
103 } | 101 } |
104 | 102 |
105 void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) { | 103 void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) { |
106 MCSection *Section = Streamer.getCurrentSectionOnly(); | 104 MCSection *Section = Streamer.getCurrentSectionOnly(); |
107 if (ConstantPool *CP = getConstantPool(Section)) { | 105 if (ConstantPool *CP = getConstantPool(Section)) |
108 CP->clearCache(); | 106 CP->clearCache(); |
109 } | |
110 } | 107 } |
111 | 108 |
112 const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer, | 109 const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer, |
113 const MCExpr *Expr, | 110 const MCExpr *Expr, |
114 unsigned Size, SMLoc Loc) { | 111 unsigned Size, SMLoc Loc) { |