diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-09-12 08:56:53 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-09-12 08:56:53 +0000 |
commit | cfd8d909693126fbbaac3d02ce0dd84a443bca87 (patch) | |
tree | 36bde5fb58f18db2960d4cdbc130462533c37743 /llvm/lib/Analysis/InstructionSimplify.cpp | |
parent | 6e0cbc89471c210c59cd080901b1dfe656db117f (diff) | |
download | bcm5719-llvm-cfd8d909693126fbbaac3d02ce0dd84a443bca87.tar.gz bcm5719-llvm-cfd8d909693126fbbaac3d02ce0dd84a443bca87.zip |
Fix an ODR violation consisting of two 'struct Query' in the global namespace.
Put them in their own anonymous namespaces. Found by GCC's new -Wodr (PR20915).
llvm-svn: 217662
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index cd795fdb781..32bc25ad8c8 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -41,6 +41,7 @@ enum { RecursionLimit = 3 }; STATISTIC(NumExpand, "Number of expansions"); STATISTIC(NumReassoc, "Number of reassociations"); +namespace { struct Query { const DataLayout *DL; const TargetLibraryInfo *TLI; @@ -53,6 +54,7 @@ struct Query { const Instruction *cxti = nullptr) : DL(DL), TLI(tli), DT(dt), AT(at), CxtI(cxti) {} }; +} // end anonymous namespace static Value *SimplifyAndInst(Value *, Value *, const Query &, unsigned); static Value *SimplifyBinOp(unsigned, Value *, Value *, const Query &, |