[llvm] r228788 - Temporary workaround to fix MSVC 2012 build problems
Andrew Kaylor
andrew.kaylor at intel.com
Tue Feb 10 18:16:34 PST 2015
Author: akaylor
Date: Tue Feb 10 20:16:34 2015
New Revision: 228788
URL: http://llvm.org/viewvc/llvm-project?rev=228788&view=rev
Log:
Temporary workaround to fix MSVC 2012 build problems
Modified:
llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp?rev=228788&r1=228787&r2=228788&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp Tue Feb 10 20:16:34 2015
@@ -18,7 +18,17 @@
using namespace llvm;
namespace {
-template <typename ArgType, typename RetType = ArgType>
+template <typename ArgType>
+ArgType PrivateGetDIAValue(IDiaSymbol *Symbol,
+ HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
+ ArgType Value;
+ if (S_OK == (Symbol->*Method)(&Value))
+ return static_cast<ArgType>(Value);
+
+ return ArgType();
+}
+
+template <typename ArgType, typename RetType>
RetType PrivateGetDIAValue(IDiaSymbol *Symbol,
HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
ArgType Value;
More information about the llvm-commits
mailing list