> +++ 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


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to