aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-11-26 00:00:44 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-11-26 00:00:44 +0000
commit08d67c77633c781afda691a1bea41e25015ed634 (patch)
tree039e15b2c838257ac7d9b5a734ca2b458c4377ee /include/llvm/Support
parent75ea1933a54b49f0dcc1c2a746638557e210557b (diff)
downloadexternal_llvm-08d67c77633c781afda691a1bea41e25015ed634.tar.gz
external_llvm-08d67c77633c781afda691a1bea41e25015ed634.tar.bz2
external_llvm-08d67c77633c781afda691a1bea41e25015ed634.zip
change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/Annotation.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h
index 2be1c10616..dcdcf22454 100644
--- a/include/llvm/Support/Annotation.h
+++ b/include/llvm/Support/Annotation.h
@@ -172,13 +172,12 @@ struct AnnotationManager {
//===--------------------------------------------------------------------===//
// Basic ID <-> Name map functionality
- static AnnotationID getID(const std::string &Name); // Name -> ID
- static const std::string &getName(AnnotationID ID); // ID -> Name
+ static AnnotationID getID(const char *Name); // Name -> ID
+ static const char *getName(AnnotationID ID); // ID -> Name
// getID - Name -> ID + registration of a factory function for demand driven
// annotation support.
- static AnnotationID getID(const std::string &Name, Factory Fact,
- void *Data = 0);
+ static AnnotationID getID(const char *Name, Factory Fact, void *Data = 0);
//===--------------------------------------------------------------------===//
// Annotation creation on demand support...