diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-17 06:06:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-17 06:06:19 +0000 |
commit | af2bf0ab306f7a9a3fe2af028656514f7ef53143 (patch) | |
tree | a25e567dd26976acd4d89ead8f6b6375b7c6f3fb | |
parent | 9e36843964abce1e4f2db23b0b2c3ec8490fe601 (diff) |
We now allow targets to use any prefix they want for global symbols. Lets
hear it for ".".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15863 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 8 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index ac77acce1b..bace7893af 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -44,12 +44,12 @@ namespace llvm { // Properties to be set by the derived class ctor, used to configure the // asmwriter. - /// UsesUnderscorePrefix - If this flag is set to true, all identifiers - /// printed by the asmwriter will include a '_' prefix. - bool UsesUnderscorePrefix; + /// GlobalPrefix - If this is set to a non-empty string, it is prepended + /// onto all global symbols. This is often used for "_" or ".". + const char *GlobalPrefix; AsmPrinter(std::ostream &o, TargetMachine &tm) - : O(o), TM(tm), UsesUnderscorePrefix(false) { } + : O(o), TM(tm), GlobalPrefix("") { } /// doInitialization - Set up the AsmPrinter when we are working on a new /// module. If your pass overrides this, it must make sure to explicitly diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 0cf5823bb8..a84cc7127f 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -19,7 +19,7 @@ using namespace llvm; bool AsmPrinter::doInitialization(Module &M) { - Mang = new Mangler(M, UsesUnderscorePrefix); + Mang = new Mangler(M, GlobalPrefix); return false; } |