summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2013-10-03 22:27:29 +0000
committerSean Callanan <scallanan@apple.com>2013-10-03 22:27:29 +0000
commitddd7a2a65b24346f3d736d16315019fb54601e5b (patch)
tree0b7e1240d0e85517fd394df3a68663b6e92bf0a4 /lldb/source/Core/Module.cpp
parent54e14615e797d8cbd62fc27ba24a54de76bb380a (diff)
downloadbcm5719-llvm-ddd7a2a65b24346f3d736d16315019fb54601e5b.tar.gz
bcm5719-llvm-ddd7a2a65b24346f3d736d16315019fb54601e5b.zip
Changed the bool conversion operator on ConstString
to be explicit, to prevent horrid things like std::string a = ConstString("foo") from taking the path ConstString -> bool -> char -> std::string. This fixes, among other things, ClangFunction. <rdar://problem/15137989> llvm-svn: 191934
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index d774a5fe5d7..d96a88d533f 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -614,7 +614,7 @@ Module::FindCompileUnits (const FileSpec &path,
const size_t num_compile_units = GetNumCompileUnits();
SymbolContext sc;
sc.module_sp = shared_from_this();
- const bool compare_directory = path.GetDirectory();
+ const bool compare_directory = (bool)path.GetDirectory();
for (size_t i=0; i<num_compile_units; ++i)
{
sc.comp_unit = GetCompileUnitAtIndex(i).get();
@@ -1509,14 +1509,14 @@ Module::MatchesModuleSpec (const ModuleSpec &module_ref)
const FileSpec &file_spec = module_ref.GetFileSpec();
if (file_spec)
{
- if (!FileSpec::Equal (file_spec, m_file, file_spec.GetDirectory()))
+ if (!FileSpec::Equal (file_spec, m_file, (bool)file_spec.GetDirectory()))
return false;
}
const FileSpec &platform_file_spec = module_ref.GetPlatformFileSpec();
if (platform_file_spec)
{
- if (!FileSpec::Equal (platform_file_spec, GetPlatformFileSpec (), platform_file_spec.GetDirectory()))
+ if (!FileSpec::Equal (platform_file_spec, GetPlatformFileSpec (), (bool)platform_file_spec.GetDirectory()))
return false;
}
OpenPOWER on IntegriCloud