Browse Source

Merge branch 'integration' into val

Tex Riddell 8 years ago
parent
commit
f6d4581fc6
2 changed files with 6 additions and 9 deletions
  1. 1 1
      include/dxc/Support/Global.h
  2. 5 8
      lib/HLSL/DxilValidation.cpp

+ 1 - 1
include/dxc/Support/Global.h

@@ -61,7 +61,7 @@ void CheckLLVMErrorCode(const std::error_code &ec);
   catch (std::bad_alloc&)                   { hr = E_OUTOFMEMORY; } \
   catch (hlsl::Exception& _hlsl_exception_) {                       \
     _Analysis_assume_(DXC_FAILED(_hlsl_exception_.hr));             \
-    return hr = _hlsl_exception_.hr;                                \
+    hr = _hlsl_exception_.hr;                                       \
   }                                                                 \
   catch (...)                               { hr = E_FAIL; }
 #define CATCH_CPP_RETURN_HRESULT() \

+ 5 - 8
lib/HLSL/DxilValidation.cpp

@@ -2719,16 +2719,13 @@ static void ValidateMetadata(ValidationContext &ValCtx) {
     ValCtx.EmitFormatError(ValidationRule::MetaTarget, {target.c_str()});
   }
 
+  // The llvm.dbg.(cu/contents/defines/mainFileName/arg) named metadata nodes
+  // are only available in debug modules, not in the validated ones.
+  // llvm.bitsets is also disallowed.
+  //
+  // These are verified in lib/IR/Verifier.cpp.
   StringMap<bool> llvmNamedMeta;
-  // These llvm named metadata is verified in lib/IR/Verifier.cpp.
-  llvmNamedMeta["llvm.dbg.cu"];
-  llvmNamedMeta["llvm.dbg.contents"];
-  llvmNamedMeta["llvm.dbg.defines"];
-  llvmNamedMeta["llvm.dbg.mainFileName"];
-  llvmNamedMeta["llvm.dbg.args"];
   llvmNamedMeta["llvm.ident"];
-  // Not for HLSL which does not have vtable.
-  // llvmNamedMeta["llvm.bitsets"];
   llvmNamedMeta["llvm.module.flags"];
 
   for (auto &NamedMetaNode : pModule->named_metadata()) {