From a73810650ebde45bb7b5248e2c5e8b9b3248d332 Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Wed, 11 Feb 2015 02:16:34 +0000 Subject: [PATCH] Temporary workaround to fix MSVC 2012 build problems git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228788 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp b/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp index 268f8329349..530d3b5deb5 100644 --- a/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp +++ b/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp @@ -18,7 +18,17 @@ using namespace llvm; namespace { -template +template +ArgType PrivateGetDIAValue(IDiaSymbol *Symbol, + HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) { + ArgType Value; + if (S_OK == (Symbol->*Method)(&Value)) + return static_cast(Value); + + return ArgType(); +} + +template RetType PrivateGetDIAValue(IDiaSymbol *Symbol, HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) { ArgType Value;