summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-22 21:51:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-22 21:51:29 +0000
commita6cd2d821a2528d30a3936b445551c59876b96ea (patch)
treeaee5987e03b0dcffea9b3125a85b47de50fb3e70
parent4037302a8bd5e5e8807c55bb942e5b31ffbc5351 (diff)
downloadbcm5719-llvm-a6cd2d821a2528d30a3936b445551c59876b96ea.tar.gz
bcm5719-llvm-a6cd2d821a2528d30a3936b445551c59876b96ea.zip
Rename NeedsSetToChangeDiffSize to HasAggressiveSymbolFolding which is a much
better name and matches what is used in the MachO writer. llvm-svn: 122443
-rw-r--r--llvm/include/llvm/MC/MCAsmInfo.h10
-rw-r--r--llvm/lib/MC/MCAsmInfo.cpp2
-rw-r--r--llvm/lib/MC/MCAsmInfoDarwin.cpp4
-rw-r--r--llvm/lib/MC/MCStreamer.cpp2
4 files changed, 11 insertions, 7 deletions
diff --git a/llvm/include/llvm/MC/MCAsmInfo.h b/llvm/include/llvm/MC/MCAsmInfo.h
index 0e6c4e7c75e..fb80cc4f3a9 100644
--- a/llvm/include/llvm/MC/MCAsmInfo.h
+++ b/llvm/include/llvm/MC/MCAsmInfo.h
@@ -197,12 +197,12 @@ namespace llvm {
/// HasSetDirective - True if the assembler supports the .set directive.
bool HasSetDirective; // Defaults to true.
- /// NeedsSetToChangeDiffSize - True if the assembler requires that we do
+ /// HasAggressiveSymbolFolding - False if the assembler requires that we use
/// Lc = a - b
/// .long Lc
- /// instead of doing
+ /// instead of
/// .long a - b
- bool NeedsSetToChangeDiffSize; // Defaults to false.
+ bool HasAggressiveSymbolFolding; // Defaults to true.
/// HasLCOMMDirective - This is true if the target supports the .lcomm
/// directive.
@@ -407,7 +407,9 @@ namespace llvm {
return ExternDirective;
}
bool hasSetDirective() const { return HasSetDirective; }
- bool needsSetToChangeDiffSize() const { return NeedsSetToChangeDiffSize; }
+ bool hasAggressiveSymbolFolding() const {
+ return HasAggressiveSymbolFolding;
+ }
bool hasLCOMMDirective() const { return HasLCOMMDirective; }
bool hasDotTypeDotSizeDirective() const {return HasDotTypeDotSizeDirective;}
bool getCOMMDirectiveAlignmentIsInBytes() const {
diff --git a/llvm/lib/MC/MCAsmInfo.cpp b/llvm/lib/MC/MCAsmInfo.cpp
index 1bc63d03fba..cc1afbd0892 100644
--- a/llvm/lib/MC/MCAsmInfo.cpp
+++ b/llvm/lib/MC/MCAsmInfo.cpp
@@ -54,7 +54,7 @@ MCAsmInfo::MCAsmInfo() {
GPRel32Directive = 0;
GlobalDirective = "\t.globl\t";
HasSetDirective = true;
- NeedsSetToChangeDiffSize = false;
+ HasAggressiveSymbolFolding = true;
HasLCOMMDirective = false;
COMMDirectiveAlignmentIsInBytes = true;
HasDotTypeDotSizeDirective = true;
diff --git a/llvm/lib/MC/MCAsmInfoDarwin.cpp b/llvm/lib/MC/MCAsmInfoDarwin.cpp
index a382741b5a2..13776f04437 100644
--- a/llvm/lib/MC/MCAsmInfoDarwin.cpp
+++ b/llvm/lib/MC/MCAsmInfoDarwin.cpp
@@ -41,7 +41,9 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
// FIXME: Darwin 10 and newer don't need this.
LinkerRequiresNonEmptyDwarfLines = true;
- NeedsSetToChangeDiffSize = true;
+ // FIXME: Change this once MC is the system assembler.
+ HasAggressiveSymbolFolding = false;
+
HiddenVisibilityAttr = MCSA_PrivateExtern;
// Doesn't support protected visibility.
ProtectedVisibilityAttr = MCSA_Global;
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 076b4d608cb..68146de9c05 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -77,7 +77,7 @@ void MCStreamer::EmitSLEB128IntValue(int64_t Value, unsigned AddrSpace) {
void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size,
unsigned AddrSpace) {
- if (!getContext().getAsmInfo().needsSetToChangeDiffSize()) {
+ if (getContext().getAsmInfo().hasAggressiveSymbolFolding()) {
EmitValue(Value, Size, AddrSpace);
return;
}
OpenPOWER on IntegriCloud