[Lldb-commits] [PATCH] D31366: Do not dereference std::unique_ptr by default
Tamas Berghammer via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 27 12:54:08 PDT 2017
tberghammer requested review of this revision.
tberghammer added a comment.
I am trying to compile it with the following command on OSX but I wasn't able to get it working:
clang -std=c++11 -g -O0 -fno-builtin -arch x86_64 -fno-limit-debug-info -I$LLVM_ROOT/lldb/packages/Python/lldbsuite/test/make/../../../../../include -include $LLVM_ROOT/lldb/packages/Python/lldbsuite/test/make/test_common.h -stdlib=libstdc++ -DLLDB_USING_LIBSTDCPP --driver-mode=g++ -c -o main.o main.cpp
Compile error (first few):
main.cpp:12:8: error: no member named 'unique_ptr' in namespace 'std'
std::unique_ptr<char> nup;
~~~~~^
main.cpp:12:23: error: expected '(' for function-style cast or type construction
std::unique_ptr<char> nup;
~~~~^
main.cpp:12:25: error: use of undeclared identifier 'nup'; did you mean 'dup'?
std::unique_ptr<char> nup;
^~~
dup
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/unistd.h:438:6: note: 'dup' declared here
int dup(int);
^
main.cpp:13:8: error: no member named 'unique_ptr' in namespace 'std'
std::unique_ptr<int> iup(new int{123});
~~~~~^
main.cpp:13:22: error: expected '(' for function-style cast or type construction
std::unique_ptr<int> iup(new int{123});
~~~^
main.cpp:13:24: error: use of undeclared identifier 'iup'; did you mean 'dup'?
std::unique_ptr<int> iup(new int{123});
^~~
dup
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/unistd.h:438:6: note: 'dup' declared here
int dup(int);
I think the problem is that this is testing libstdc++ what is not available on OSX.
Clang version:
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin16.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
https://reviews.llvm.org/D31366
More information about the lldb-commits
mailing list