From 4321ded265a20cb62fa5a99918dfc7d227094b8e Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sun, 28 Oct 2001 21:23:44 +0000 Subject: [PATCH] Add support for name mangling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@998 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Linker.h | 19 ++++++++++++++++++- include/llvm/Support/Linker.h | 19 ++++++++++++++++++- include/llvm/Transforms/Utils/Linker.h | 19 ++++++++++++++++++- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/include/llvm/Linker.h b/include/llvm/Linker.h index ea981f56528..8774012f152 100644 --- a/include/llvm/Linker.h +++ b/include/llvm/Linker.h @@ -9,12 +9,29 @@ #include class Module; +class Type; +class Value; + // LinkModules - This function links two modules together, with the resulting // left module modified to be the composite of the two input modules. If an // error occurs, true is returned and ErrorMsg (if not null) is set to indicate // the problem. // -bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); +bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); + + +// MangleTypeName - Implement a consistent name-mangling scheme for +// a given type. +// +string MangleTypeName(const Type* type); + + +// MangleName - implement a consistent name-mangling scheme for all +// externally visible (i.e., global) objects. +// privateName should be unique within the module. +// +string MangleName(const string& privateName, const Value* V); + #endif diff --git a/include/llvm/Support/Linker.h b/include/llvm/Support/Linker.h index ea981f56528..8774012f152 100644 --- a/include/llvm/Support/Linker.h +++ b/include/llvm/Support/Linker.h @@ -9,12 +9,29 @@ #include class Module; +class Type; +class Value; + // LinkModules - This function links two modules together, with the resulting // left module modified to be the composite of the two input modules. If an // error occurs, true is returned and ErrorMsg (if not null) is set to indicate // the problem. // -bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); +bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); + + +// MangleTypeName - Implement a consistent name-mangling scheme for +// a given type. +// +string MangleTypeName(const Type* type); + + +// MangleName - implement a consistent name-mangling scheme for all +// externally visible (i.e., global) objects. +// privateName should be unique within the module. +// +string MangleName(const string& privateName, const Value* V); + #endif diff --git a/include/llvm/Transforms/Utils/Linker.h b/include/llvm/Transforms/Utils/Linker.h index ea981f56528..8774012f152 100644 --- a/include/llvm/Transforms/Utils/Linker.h +++ b/include/llvm/Transforms/Utils/Linker.h @@ -9,12 +9,29 @@ #include class Module; +class Type; +class Value; + // LinkModules - This function links two modules together, with the resulting // left module modified to be the composite of the two input modules. If an // error occurs, true is returned and ErrorMsg (if not null) is set to indicate // the problem. // -bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); +bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); + + +// MangleTypeName - Implement a consistent name-mangling scheme for +// a given type. +// +string MangleTypeName(const Type* type); + + +// MangleName - implement a consistent name-mangling scheme for all +// externally visible (i.e., global) objects. +// privateName should be unique within the module. +// +string MangleName(const string& privateName, const Value* V); + #endif -- 2.34.1