[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h
Chris Lattner
clattner at apple.com
Fri Apr 20 17:43:53 PDT 2007
> +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Fri Apr 20
> 16:38:10 2007
> @@ -19,6 +19,7 @@
> #ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H
> #define LLVM_CODEGEN_SELECTIONDAGNODES_H
>
> +#include "llvm/GlobalVariable.h"
Please don't add this #include, just define the GlobalAddressSDNode
ctor method out-of-line as needed.
> @@ -1164,7 +1167,12 @@
> friend class SelectionDAG;
> GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
> MVT::ValueType VT,
> int o = 0)
> - : SDNode(isTarget ? ISD::TargetGlobalAddress :
> ISD::GlobalAddress,
> + : SDNode(dyn_cast<GlobalVariable>(GA) &&
Please use "isa<GlobalVariable>(GA)" instead of dyncast because this
is a predicate.
-Chris
More information about the llvm-commits
mailing list