diff options
author | Julien Lerouge <jlerouge@apple.com> | 2011-09-09 22:41:49 +0000 |
---|---|---|
committer | Julien Lerouge <jlerouge@apple.com> | 2011-09-09 22:41:49 +0000 |
commit | 5a6b6987dcb4592427f4f3fcee9b7ce5dd3ba4fe (patch) | |
tree | 3fbd1b68c6991059043061b4e5ea6a2206f7f14e /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 5bfb0e0a852533bc6b9248285503c05127d2395e (diff) | |
download | bcm5719-llvm-5a6b6987dcb4592427f4f3fcee9b7ce5dd3ba4fe.tar.gz bcm5719-llvm-5a6b6987dcb4592427f4f3fcee9b7ce5dd3ba4fe.zip |
Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.
llvm-svn: 139423
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 36dcffcd4c0..702aca8aca7 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2272,6 +2272,23 @@ public: void EmitCXXThrowExpr(const CXXThrowExpr *E); //===--------------------------------------------------------------------===// + // Annotations Emission + //===--------------------------------------------------------------------===// + + /// Emit an annotation call (intrinsic or builtin). + llvm::Value *EmitAnnotationCall(llvm::Value *AnnotationFn, + llvm::Value *AnnotatedVal, + llvm::StringRef AnnotationStr, + SourceLocation Location); + + /// Emit local annotations for the local variable V, declared by D. + void EmitVarAnnotations(const VarDecl *D, llvm::Value *V); + + /// Emit field annotations for the given field & value. Returns the + /// annotation result. + llvm::Value *EmitFieldAnnotations(const FieldDecl *D, llvm::Value *V); + + //===--------------------------------------------------------------------===// // Internal Helpers //===--------------------------------------------------------------------===// |