File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 7
7
// ===----------------------------------------------------------------------===//
8
8
9
9
#include " llvm/Transforms/Utils/DXILUpgrade.h"
10
+ #include " llvm/IR/Constants.h"
11
+ #include " llvm/IR/Metadata.h"
12
+ #include " llvm/IR/Module.h"
13
+ #include " llvm/Support/Debug.h"
10
14
11
15
using namespace llvm ;
12
16
17
+ #define DEBUG_TYPE " dxil-upgrade"
18
+
13
19
static bool handleValVerMetadata (Module &M) {
14
20
NamedMDNode *ValVer = M.getNamedMetadata (" dx.valver" );
15
21
if (!ValVer)
16
22
return false ;
17
23
24
+ LLVM_DEBUG ({
25
+ MDNode *N = ValVer->getOperand (0 );
26
+ auto X = mdconst::extract<ConstantInt>(N->getOperand (0 ))->getZExtValue ();
27
+ auto Y = mdconst::extract<ConstantInt>(N->getOperand (1 ))->getZExtValue ();
28
+ dbgs () << " DXIL: validation version: " << X << " ." << Y << " \n " ;
29
+ });
18
30
// We don't need the validation version internally, so we drop it.
19
31
ValVer->dropAllReferences ();
20
32
ValVer->eraseFromParent ();
You can’t perform that action at this time.
0 commit comments