]> granicus.if.org Git - llvm/commitdiff
Sort includes + include a missing `extern "C"` header
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Tue, 10 Jul 2018 22:48:13 +0000 (22:48 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Tue, 10 Jul 2018 22:48:13 +0000 (22:48 +0000)
If we don't include Initialization.h,
`LLVMInitializeAggressiveInstCombiner` won't see its `extern "C"` decl.
This causes sadness, name mangling, and linker errors.

Reported on the mailing lists by Vladimir Vissoultchev. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336736 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp

index ac7e2e62cf7e27067ef800a80dcfbea8f57160d3..000e19c0c0a4eb64d7caa4a6fcc605c9b8f3d7c5 100644 (file)
 
 #include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
 #include "AggressiveInstCombineInternal.h"
+#include "llvm-c/Initialization.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/BasicAliasAnalysis.h"
 #include "llvm/Analysis/GlobalsModRef.h"
 #include "llvm/Analysis/TargetLibraryInfo.h"
-#include "llvm/Transforms/Utils/Local.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/LegacyPassManager.h"
 #include "llvm/IR/PatternMatch.h"
 #include "llvm/Pass.h"
+#include "llvm/Transforms/Utils/Local.h"
 using namespace llvm;
 using namespace PatternMatch;