diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains/ROCm.h')
-rw-r--r-- | clang/lib/Driver/ToolChains/ROCm.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/ROCm.h b/clang/lib/Driver/ToolChains/ROCm.h index 33baaa887043..5c1431f3270c 100644 --- a/clang/lib/Driver/ToolChains/ROCm.h +++ b/clang/lib/Driver/ToolChains/ROCm.h @@ -107,6 +107,7 @@ private: SmallString<0> LibPath; SmallString<0> LibDevicePath; SmallString<0> IncludePath; + SmallString<0> SharePath; llvm::StringMap<std::string> LibDeviceMap; // Libraries that are always linked. @@ -251,8 +252,11 @@ public: } /// Get libdevice file for given architecture - std::string getLibDeviceFile(StringRef Gpu) const { - return LibDeviceMap.lookup(Gpu); + StringRef getLibDeviceFile(StringRef Gpu) const { + auto Loc = LibDeviceMap.find(Gpu); + if (Loc == LibDeviceMap.end()) + return ""; + return Loc->second; } void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, @@ -262,7 +266,7 @@ public: void detectHIPRuntime(); /// Get the values for --rocm-device-lib-path arguments - std::vector<std::string> getRocmDeviceLibPathArg() const { + ArrayRef<std::string> getRocmDeviceLibPathArg() const { return RocmDeviceLibPathArg; } @@ -272,7 +276,7 @@ public: /// Get the value for --hip-version argument StringRef getHIPVersionArg() const { return HIPVersionArg; } - std::string getHIPVersion() const { return DetectedVersion; } + StringRef getHIPVersion() const { return DetectedVersion; } }; } // end namespace driver |