diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/GlobalValue.h | 5 | ||||
-rw-r--r-- | include/llvm/Module.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/Mangler.h | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index b0e58d4..8fb5580 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -35,6 +35,7 @@ public: WeakLinkage, ///< Keep one copy of named function when linking (weak) AppendingLinkage, ///< Special purpose, only applies to global arrays InternalLinkage, ///< Rename collisions when linking (static functions) + PrivateLinkage, ///< Like Internal, but omit from symbol table DLLImportLinkage, ///< Function to be imported from DLL DLLExportLinkage, ///< Function to be accessible from DLL ExternalWeakLinkage,///< ExternalWeak linkage description @@ -104,6 +105,10 @@ public: bool hasCommonLinkage() const { return Linkage == CommonLinkage; } bool hasAppendingLinkage() const { return Linkage == AppendingLinkage; } bool hasInternalLinkage() const { return Linkage == InternalLinkage; } + bool hasPrivateLinkage() const { return Linkage == PrivateLinkage; } + bool hasLocalLinkage() const { + return Linkage == InternalLinkage || Linkage == PrivateLinkage; + } bool hasDLLImportLinkage() const { return Linkage == DLLImportLinkage; } bool hasDLLExportLinkage() const { return Linkage == DLLExportLinkage; } bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; } diff --git a/include/llvm/Module.h b/include/llvm/Module.h index af687c8..b0db50a 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -188,7 +188,7 @@ public: /// getOrInsertFunction - Look up the specified function in the module symbol /// table. Four possibilities: /// 1. If it does not exist, add a prototype for the function and return it. - /// 2. If it exists, and has internal linkage, the existing function is + /// 2. If it exists, and has a local linkage, the existing function is /// renamed and a new one is inserted. /// 3. Otherwise, if the existing function has the correct prototype, return /// the existing function. diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index 771c09e..7820b85 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -29,6 +29,7 @@ class Mangler { /// symbol is marked as not needing this prefix. const char *Prefix; + const char *PrivatePrefix; /// UseQuotes - If this is set, the target accepts global names in quotes, /// e.g. "foo bar" is a legal name. This syntax is used instead of escaping /// the space character. By default, this is false. @@ -58,7 +59,7 @@ public: // Mangler ctor - if a prefix is specified, it will be prepended onto all // symbols. - Mangler(Module &M, const char *Prefix = ""); + Mangler(Module &M, const char *Prefix = "", const char *privatePrefix = ""); /// setUseQuotes - If UseQuotes is set to true, this target accepts quoted /// strings for assembler labels. |