summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/MC/ConstantPools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/MC/ConstantPools.cpp')
-rw-r--r--contrib/llvm/lib/MC/ConstantPools.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/contrib/llvm/lib/MC/ConstantPools.cpp b/contrib/llvm/lib/MC/ConstantPools.cpp
index a239a8f..f7649fb 100644
--- a/contrib/llvm/lib/MC/ConstantPools.cpp
+++ b/contrib/llvm/lib/MC/ConstantPools.cpp
@@ -37,10 +37,10 @@ void ConstantPool::emitEntries(MCStreamer &Streamer) {
const MCExpr *ConstantPool::addEntry(const MCExpr *Value, MCContext &Context,
unsigned Size) {
- MCSymbol *CPEntryLabel = Context.CreateTempSymbol();
+ MCSymbol *CPEntryLabel = Context.createTempSymbol();
Entries.push_back(ConstantPoolEntry(CPEntryLabel, Value, Size));
- return MCSymbolRefExpr::Create(CPEntryLabel, Context);
+ return MCSymbolRefExpr::create(CPEntryLabel, Context);
}
bool ConstantPool::empty() { return Entries.empty(); }
@@ -48,8 +48,7 @@ bool ConstantPool::empty() { return Entries.empty(); }
//
// AssemblerConstantPools implementation
//
-ConstantPool *
-AssemblerConstantPools::getConstantPool(const MCSection *Section) {
+ConstantPool *AssemblerConstantPools::getConstantPool(MCSection *Section) {
ConstantPoolMapTy::iterator CP = ConstantPools.find(Section);
if (CP == ConstantPools.end())
return nullptr;
@@ -58,11 +57,11 @@ AssemblerConstantPools::getConstantPool(const MCSection *Section) {
}
ConstantPool &
-AssemblerConstantPools::getOrCreateConstantPool(const MCSection *Section) {
+AssemblerConstantPools::getOrCreateConstantPool(MCSection *Section) {
return ConstantPools[Section];
}
-static void emitConstantPool(MCStreamer &Streamer, const MCSection *Section,
+static void emitConstantPool(MCStreamer &Streamer, MCSection *Section,
ConstantPool &CP) {
if (!CP.empty()) {
Streamer.SwitchSection(Section);
@@ -75,7 +74,7 @@ void AssemblerConstantPools::emitAll(MCStreamer &Streamer) {
for (ConstantPoolMapTy::iterator CPI = ConstantPools.begin(),
CPE = ConstantPools.end();
CPI != CPE; ++CPI) {
- const MCSection *Section = CPI->first;
+ MCSection *Section = CPI->first;
ConstantPool &CP = CPI->second;
emitConstantPool(Streamer, Section, CP);
@@ -83,7 +82,7 @@ void AssemblerConstantPools::emitAll(MCStreamer &Streamer) {
}
void AssemblerConstantPools::emitForCurrentSection(MCStreamer &Streamer) {
- const MCSection *Section = Streamer.getCurrentSection().first;
+ MCSection *Section = Streamer.getCurrentSection().first;
if (ConstantPool *CP = getConstantPool(Section)) {
emitConstantPool(Streamer, Section, *CP);
}
@@ -92,7 +91,7 @@ void AssemblerConstantPools::emitForCurrentSection(MCStreamer &Streamer) {
const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer,
const MCExpr *Expr,
unsigned Size) {
- const MCSection *Section = Streamer.getCurrentSection().first;
+ MCSection *Section = Streamer.getCurrentSection().first;
return getOrCreateConstantPool(Section).addEntry(Expr, Streamer.getContext(),
Size);
}
OpenPOWER on IntegriCloud