[Transforms] Make sure to include the c binding header when defining c binding functions
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 29 Mar 2018 07:56:53 +0000 (07:56 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 29 Mar 2018 07:56:53 +0000 (07:56 +0000)
Otherwise the definitions can't see the extern C declarations and get
name mangled, making it impossible for users to call them. This breaks
the Go bindings.

llvm-svn: 328765

llvm/lib/Transforms/Utils/Utils.cpp

index 71ceee6..57c7c3b 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "llvm/Transforms/Utils.h"
 #include "llvm-c/Initialization.h"
+#include "llvm-c/Transforms/Scalar.h"
 #include "llvm/IR/LegacyPassManager.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/PassRegistry.h"