marsupial updated this revision to Diff 105466.
https://reviews.llvm.org/D33659
Files:
lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===
--- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -53,23 +53,23 @@
i != e; ++i) {
// Get access to the plugin.
std::string err;
-DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
-if (!lib.isValid()) {
+DynamicLibrary *lib = DynamicLibrary::getPermanentLibrary(i->c_str(),
&err);
+if (!lib) {
diags->Report(diag::err_fe_unable_to_load_plugin) << *i << err;
continue;
}
// See if it's compatible with this build of clang.
const char *pluginAPIVersion =
- (const char *) lib.getAddressOfSymbol("clang_analyzerAPIVersionString");
+ (const char *) lib->getAddressOfSymbol("clang_analyzerAPIVersionString");
if (!isCompatibleAPIVersion(pluginAPIVersion)) {
warnIncompatible(diags, *i, pluginAPIVersion);
continue;
}
// Register its checkers.
RegisterCheckersFn registerPluginCheckers =
- (RegisterCheckersFn) (intptr_t) lib.getAddressOfSymbol(
+ (RegisterCheckersFn) (intptr_t) lib->getAddressOfSymbol(
"clang_registerCheckers");
if (registerPluginCheckers)
registerPluginCheckers(*this);
Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
===
--- lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -53,23 +53,23 @@
i != e; ++i) {
// Get access to the plugin.
std::string err;
-DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
-if (!lib.isValid()) {
+DynamicLibrary *lib = DynamicLibrary::getPermanentLibrary(i->c_str(), &err);
+if (!lib) {
diags->Report(diag::err_fe_unable_to_load_plugin) << *i << err;
continue;
}
// See if it's compatible with this build of clang.
const char *pluginAPIVersion =
- (const char *) lib.getAddressOfSymbol("clang_analyzerAPIVersionString");
+ (const char *) lib->getAddressOfSymbol("clang_analyzerAPIVersionString");
if (!isCompatibleAPIVersion(pluginAPIVersion)) {
warnIncompatible(diags, *i, pluginAPIVersion);
continue;
}
// Register its checkers.
RegisterCheckersFn registerPluginCheckers =
- (RegisterCheckersFn) (intptr_t) lib.getAddressOfSymbol(
+ (RegisterCheckersFn) (intptr_t) lib->getAddressOfSymbol(
"clang_registerCheckers");
if (registerPluginCheckers)
registerPluginCheckers(*this);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits