[llvm-commits] [llvm] r48257 - in /llvm/trunk/lib: CodeGen/SelectionDAG/SelectionDAG.cpp Target/X86/X86ATTAsmPrinter.cpp

Duncan Sands baldrick at free.fr
Wed Mar 12 00:56:35 PDT 2008


> +  if (!GVar) {
> +    // If GV is an alias - use aliasee for determing thread-localness

-> If GV is an alias then use the aliasee for determining thread-localness.

> +    if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))

How about using dyn_cast_or_null, avoiding the above null check for GVar?

> +    if (!GVar) {
> +      // If GV is an alias - use aliasee for determing thread-localness
> +      if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
> +        GVar = dyn_cast_or_null<GlobalVariable>(GA->resolveAliasedGlobal());

Likewise, for the comment and for the cast.

Ciao,

Duncan.



More information about the llvm-commits mailing list