summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-12-21 01:47:05 +0000
committerSean Callanan <scallanan@apple.com>2011-12-21 01:47:05 +0000
commitfebbd63db10a6ebea610a6761b5b4450ecf753b7 (patch)
treecba7b46f2751be91827a2a608bb8945e76a9eed3
parent7de7ab83fa16cd44b1e62271382ff4c12099419b (diff)
downloadbcm5719-llvm-febbd63db10a6ebea610a6761b5b4450ecf753b7.tar.gz
bcm5719-llvm-febbd63db10a6ebea610a6761b5b4450ecf753b7.zip
Tightened Clang against a bug in which RecordDecls
with incomplete definition data were being converted. Now Clang attempts to complete RecordDecls before converting them, avoiding a nasty crash. llvm-svn: 147029
-rw-r--r--lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme20
-rw-r--r--lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme9
-rw-r--r--lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme2
-rw-r--r--lldb/lldb.xcworkspace/contents.xcworkspacedata3
-rw-r--r--lldb/scripts/clang.complete-type-being-converted.diff14
5 files changed, 40 insertions, 8 deletions
diff --git a/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme b/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
index a6c35bdfd6d..2df57052121 100644
--- a/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
+++ b/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- version = "1.3">
+ version = "1.8">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
@@ -28,6 +28,15 @@
buildConfiguration = "Debug">
<Testables>
</Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
+ BuildableName = "lldb"
+ BlueprintName = "lldb-tool"
+ ReferencedContainer = "container:lldb.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "BLUBBY"
@@ -41,9 +50,11 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
displayScaleIsEnabled = "NO"
displayScale = "1.00"
- launchStyle = "0"
+ launchStyle = "1"
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug">
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
@@ -69,7 +80,8 @@
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release">
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
<EnvironmentVariables>
<EnvironmentVariable
key = "BLUBBY"
diff --git a/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme b/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme
index 199c1d140a9..0f3ad1ade01 100644
--- a/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme
+++ b/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- version = "1.3">
+ version = "1.8">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
@@ -43,7 +43,9 @@
displayScale = "1.00"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug">
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
@@ -69,7 +71,8 @@
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release">
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
diff --git a/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme b/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
index 6e12c06c956..1b6d31bf73f 100644
--- a/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
+++ b/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
@@ -83,7 +83,7 @@
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
+ launchStyle = "1"
useCustomWorkingDirectory = "NO"
customWorkingDirectory = "/Volumes/work/gclayton/Documents/devb/attach"
buildConfiguration = "Debug"
diff --git a/lldb/lldb.xcworkspace/contents.xcworkspacedata b/lldb/lldb.xcworkspace/contents.xcworkspacedata
index f92eeccdc23..5530459e124 100644
--- a/lldb/lldb.xcworkspace/contents.xcworkspacedata
+++ b/lldb/lldb.xcworkspace/contents.xcworkspacedata
@@ -7,4 +7,7 @@
<FileRef
location = "group:tools/debugserver/debugserver.xcodeproj">
</FileRef>
+ <FileRef
+ location = "group:llvm">
+ </FileRef>
</Workspace>
diff --git a/lldb/scripts/clang.complete-type-being-converted.diff b/lldb/scripts/clang.complete-type-being-converted.diff
new file mode 100644
index 00000000000..8c01fa1161a
--- /dev/null
+++ b/lldb/scripts/clang.complete-type-being-converted.diff
@@ -0,0 +1,14 @@
+Index: lib/CodeGen/CodeGenTypes.cpp
+===================================================================
+--- lib/CodeGen/CodeGenTypes.cpp (revision 146622)
++++ lib/CodeGen/CodeGenTypes.cpp (working copy)
+@@ -113,6 +113,9 @@
+ static bool
+ isSafeToConvert(const RecordDecl *RD, CodeGenTypes &CGT,
+ llvm::SmallPtrSet<const RecordDecl*, 16> &AlreadyChecked) {
++ if (RD->hasExternalLexicalStorage() && !RD->getDefinition())
++ RD->getASTContext().getExternalSource()->CompleteType(const_cast<RecordDecl*>(RD));
++
+ // If we have already checked this type (maybe the same type is used by-value
+ // multiple times in multiple structure fields, don't check again.
+ if (!AlreadyChecked.insert(RD)) return true;
OpenPOWER on IntegriCloud