We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6387a5 commit 623043eCopy full SHA for 623043e
lib/AST/PluginRegistry.cpp
@@ -50,14 +50,13 @@ llvm::Error PluginRegistry::loadLibraryPlugin(StringRef path) {
50
#if defined(_WIN32)
51
lib = LoadLibraryA(path.str().c_str());
52
if (!lib) {
53
- return llvm::createStringError(std::errc::not_supported, "failed");
54
- return true;
+ std::error_code ec(GetLastError(), std::system_category());
+ return llvm::errorCodeToError(ec);
55
}
56
#else
57
lib = dlopen(path.str().c_str(), RTLD_LAZY | RTLD_LOCAL);
58
59
- return llvm::createStringError(std::errc::not_supported,
60
- "unsupported platform");
+ return llvm::createStringError(std::error_code(), dlerror());
61
62
#endif
63
LoadedPluginLibraries.insert({path, lib});
0 commit comments