summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorRobert Lytton <robert@xmos.com>2014-07-03 09:30:33 +0000
committerRobert Lytton <robert@xmos.com>2014-07-03 09:30:33 +0000
commit57765d53477910de18f8c5e7d2ce585a0f782935 (patch)
treedd49e005a177b84fd5bc0e17927d1c5402bd18a2 /clang/lib/CodeGen/CodeGenModule.h
parent5b88f78f7a342d1eee97acff4dcc4c0170464535 (diff)
downloadbcm5719-llvm-57765d53477910de18f8c5e7d2ce585a0f782935.tar.gz
bcm5719-llvm-57765d53477910de18f8c5e7d2ce585a0f782935.zip
Move the calling of emitTargetMD() later.
Summary: Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz: extern char a[]; char f(){ return a[5];} char a[10]; Change MangledDeclNames to use a MapVector rather than a DenseMap so that the Metadata is output in order of original declaration, so to make deterministic and improve human readablity. Differential Revision: http://reviews.llvm.org/D4176 llvm-svn: 212263
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 88f5faf7093..c0bfb4c5e6b 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -349,8 +349,8 @@ class CodeGenModule : public CodeGenTypeCache {
/// emitted when the translation unit is complete.
CtorList GlobalDtors;
- /// A map of canonical GlobalDecls to their mangled names.
- llvm::DenseMap<GlobalDecl, StringRef> MangledDeclNames;
+ /// An ordered map of canonical GlobalDecls to their mangled names.
+ llvm::MapVector<GlobalDecl, StringRef> MangledDeclNames;
llvm::StringMap<GlobalDecl, llvm::BumpPtrAllocator> Manglings;
/// Global annotations.
@@ -1146,6 +1146,9 @@ private:
/// \brief Emit the Clang version as llvm.ident metadata.
void EmitVersionIdentMetadata();
+ /// Emits target specific Metadata for global declarations.
+ void EmitTargetMetadata();
+
/// Emit the llvm.gcov metadata used to tell LLVM where to emit the .gcno and
/// .gcda files in a way that persists in .bc files.
void EmitCoverageFile();
OpenPOWER on IntegriCloud