[llvm] r278119 - Add `#ifdef __cplusplus` around `extern "C"` in Compiler.h. NFC.
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 05:12:16 PDT 2016
Author: kuba.brecka
Date: Tue Aug 9 07:12:15 2016
New Revision: 278119
URL: http://llvm.org/viewvc/llvm-project?rev=278119&view=rev
Log:
Add `#ifdef __cplusplus` around `extern "C"` in Compiler.h. NFC.
Modified:
llvm/trunk/include/llvm/Support/Compiler.h
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=278119&r1=278118&r2=278119&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Tue Aug 9 07:12:15 2016
@@ -405,12 +405,16 @@
// Thread Sanitizer is a tool that finds races in code.
// See http://code.google.com/p/data-race-test/wiki/DynamicAnnotations .
// tsan detects these exact functions by name.
+#ifdef __cplusplus
extern "C" {
+#endif
void AnnotateHappensAfter(const char *file, int line, const volatile void *cv);
void AnnotateHappensBefore(const char *file, int line, const volatile void *cv);
void AnnotateIgnoreWritesBegin(const char *file, int line);
void AnnotateIgnoreWritesEnd(const char *file, int line);
+#ifdef __cplusplus
}
+#endif
// This marker is used to define a happens-before arc. The race detector will
// infer an arc from the begin to the end when they share the same pointer
More information about the llvm-commits
mailing list