summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-28 22:49:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-28 22:49:15 +0000
commit4ee0d03274a77e080cc3888d55d9d3ac4dd3c206 (patch)
treec6587a0346f148be0103e77771a4bf7d12d59ee1 /llvm/lib
parent4044fdccfc8694b42effffa1d40eb0e4b7ea572f (diff)
downloadbcm5719-llvm-4ee0d03274a77e080cc3888d55d9d3ac4dd3c206.tar.gz
bcm5719-llvm-4ee0d03274a77e080cc3888d55d9d3ac4dd3c206.zip
MC: Add support for disabling "temporary label" behavior. Useful for debugging
on Darwin. llvm-svn: 128430
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/MCContext.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 018f00c08f6..7c687135fc6 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -28,7 +28,8 @@ typedef StringMap<const MCSectionCOFF*> COFFUniqueMapTy;
MCContext::MCContext(const MCAsmInfo &mai, const TargetAsmInfo *tai) :
MAI(mai), TAI(tai), NextUniqueID(0),
- CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0) {
+ CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0),
+ AllowTemporaryLabels(true) {
MachOUniquingMap = 0;
ELFUniquingMap = 0;
COFFUniquingMap = 0;
@@ -76,8 +77,10 @@ MCSymbol *MCContext::GetOrCreateSymbol(StringRef Name) {
}
MCSymbol *MCContext::CreateSymbol(StringRef Name) {
- // Determine whether this is an assembler temporary or normal label.
- bool isTemporary = Name.startswith(MAI.getPrivateGlobalPrefix());
+ // Determine whether this is an assembler temporary or normal label, if used.
+ bool isTemporary = false;
+ if (AllowTemporaryLabels)
+ isTemporary = Name.startswith(MAI.getPrivateGlobalPrefix());
StringMapEntry<bool> *NameEntry = &UsedNames.GetOrCreateValue(Name);
if (NameEntry->getValue()) {
OpenPOWER on IntegriCloud