diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h index 33f2fcb1139..49c894092fa 100644 --- a/include/llvm/ADT/PointerUnion.h +++ b/include/llvm/ADT/PointerUnion.h @@ -186,8 +186,9 @@ namespace llvm { int is() const { // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.is() && Val.get().is(); - return Val.is(); + return Val.template is() && + Val.template get().template is(); + return Val.template is(); } /// get() - Return the value of the specified pointer type. If the @@ -197,9 +198,9 @@ namespace llvm { assert(is() && "Invalid accessor called"); // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.get().get(); + return Val.template get().template get(); - return Val.get(); + return Val.template get(); } /// dyn_cast() - If the current value is of the specified pointer type, @@ -291,8 +292,10 @@ namespace llvm { int is() const { // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.is() && Val.get().is(); - return Val.is() && Val.get().is(); + return Val.template is() && + Val.template get().template is(); + return Val.template is() && + Val.template get().template is(); } /// get() - Return the value of the specified pointer type. If the @@ -302,9 +305,9 @@ namespace llvm { assert(is() && "Invalid accessor called"); // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.get().get(); + return Val.template get().template get(); - return Val.get().get(); + return Val.template get().template get(); } /// dyn_cast() - If the current value is of the specified pointer type,