File tree 2 files changed +5
-8
lines changed
include/clang/Interpreter
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class CXXRecordDecl;
41
41
class Decl ;
42
42
class IncrementalExecutor ;
43
43
class IncrementalParser ;
44
+ class IncrementalCUDADeviceParser ;
44
45
45
46
// / Create a pre-configured \c CompilerInstance for incremental processing.
46
47
class IncrementalCompilerBuilder {
@@ -93,7 +94,7 @@ class Interpreter {
93
94
std::unique_ptr<IncrementalExecutor> IncrExecutor;
94
95
95
96
// An optional parser for CUDA offloading
96
- std::unique_ptr<IncrementalParser > DeviceParser;
97
+ std::unique_ptr<IncrementalCUDADeviceParser > DeviceParser;
97
98
98
99
// An optional action for CUDA offloading
99
100
std::unique_ptr<IncrementalAction> DeviceAct;
Original file line number Diff line number Diff line change @@ -574,20 +574,16 @@ Interpreter::Parse(llvm::StringRef Code) {
574
574
// included in the host compilation
575
575
if (DeviceParser) {
576
576
llvm::Expected<TranslationUnitDecl *> DeviceTU = DeviceParser->Parse (Code);
577
- if (auto E = DeviceTU.takeError ()) {
577
+ if (auto E = DeviceTU.takeError ())
578
578
return std::move (E);
579
- }
580
-
581
- auto *CudaParser =
582
- llvm::cast<IncrementalCUDADeviceParser>(DeviceParser.get ());
583
579
584
580
RegisterPTU (*DeviceTU, nullptr , DeviceAct.get ());
585
581
586
- llvm::Expected<llvm::StringRef> PTX = CudaParser ->GeneratePTX ();
582
+ llvm::Expected<llvm::StringRef> PTX = DeviceParser ->GeneratePTX ();
587
583
if (!PTX)
588
584
return PTX.takeError ();
589
585
590
- llvm::Error Err = CudaParser ->GenerateFatbinary ();
586
+ llvm::Error Err = DeviceParser ->GenerateFatbinary ();
591
587
if (Err)
592
588
return std::move (Err);
593
589
}
You can’t perform that action at this time.
0 commit comments