summaryrefslogtreecommitdiff
path: root/tools/lto
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-03-30 23:26:06 +0000
committerBill Wendling <isanbard@gmail.com>2012-03-30 23:26:06 +0000
commit5ff4bc20a131cdf6fd0706b7abd80e16efc2f0e7 (patch)
tree692bd4d2f76f7509efec3dd1752c5759b0ef2bb3 /tools/lto
parentcef670a3a3fd448edfb38d8b513f5aa775257352 (diff)
downloadllvm-5ff4bc20a131cdf6fd0706b7abd80e16efc2f0e7.tar.gz
llvm-5ff4bc20a131cdf6fd0706b7abd80e16efc2f0e7.tar.bz2
llvm-5ff4bc20a131cdf6fd0706b7abd80e16efc2f0e7.tar.xz
* Set the scope attributes for the ASM symbol we added to be the value passed
into the function. * Reorder some header files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOModule.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index 97e4e54dce..45890a58d5 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -16,30 +16,31 @@
#include "llvm/Constants.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
-#include "llvm/ADT/OwningPtr.h"
-#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/Support/SystemUtils.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/MathExtras.h"
-#include "llvm/Support/Host.h"
-#include "llvm/Support/Path.h"
-#include "llvm/Support/Process.h"
-#include "llvm/Support/SourceMgr.h"
-#include "llvm/Support/TargetRegistry.h"
-#include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/system_error.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
-#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
-#include "llvm/MC/SubtargetFeature.h"
#include "llvm/MC/MCTargetAsmParser.h"
+#include "llvm/MC/SubtargetFeature.h"
+#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/Support/Host.h"
+#include "llvm/Support/MathExtras.h"
+#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Process.h"
+#include "llvm/Support/SourceMgr.h"
+#include "llvm/Support/SystemUtils.h"
+#include "llvm/Support/TargetRegistry.h"
+#include "llvm/Support/TargetSelect.h"
+#include "llvm/Support/system_error.h"
+#include "llvm/ADT/OwningPtr.h"
+#include "llvm/ADT/Triple.h"
+
using namespace llvm;
LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t)
@@ -408,6 +409,9 @@ void LTOModule::addAsmGlobalSymbol(const char *name,
addDefinedFunctionSymbol(cast<Function>(info.symbol));
else
addDefinedDataSymbol(info.symbol);
+
+ _symbols.back().attributes &= ~LTO_SYMBOL_SCOPE_MASK;
+ _symbols.back().attributes |= scope;
}
/// addAsmGlobalSymbolUndef - Add a global symbol from module-level ASM to the