File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
clang/include/clang/Driver Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,18 @@ class Driver {
565
565
return IsOffload ? OffloadLTOMode : LTOMode;
566
566
}
567
567
568
+ // / Addition for Swift. Allows ClangImporter to extract the path to libstdc++.
569
+ std::vector<std::string>
570
+ getLibStdCxxIncludePaths (const llvm::opt::ArgList &DriverArgs,
571
+ const llvm::Triple &Target) const {
572
+ llvm::opt::ArgStringList ArgStrings;
573
+ getToolChain (DriverArgs, Target)
574
+ .addLibStdCxxIncludePaths (DriverArgs, ArgStrings);
575
+ unsigned Unused1, Unused2;
576
+ auto ParsedArgs = getOpts ().ParseArgs (ArgStrings, Unused1, Unused2);
577
+ return ParsedArgs.getAllArgValues (options::OPT_internal_isystem);
578
+ }
579
+
568
580
private:
569
581
570
582
// / Tries to load options from configuration file.
Original file line number Diff line number Diff line change @@ -222,6 +222,11 @@ class ToolChain {
222
222
llvm::vfs::FileSystem &getVFS () const ;
223
223
const llvm::Triple &getTriple () const { return Triple; }
224
224
225
+ // / Addition for Swift. Allows ClangImporter to extract the path to libstdc++.
226
+ virtual void
227
+ addLibStdCxxIncludePaths (const llvm::opt::ArgList &DriverArgs,
228
+ llvm::opt::ArgStringList &CC1Args) const {};
229
+
225
230
// / Get the toolchain's aux triple, if it has one.
226
231
// /
227
232
// / Exactly what the aux triple represents depends on the toolchain, but for
You can’t perform that action at this time.
0 commit comments