From 7287c45c13dc887cebe3db6abfa2f1080186bb97 Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Tue, 22 Oct 2013 10:16:49 -0700 Subject: Make sure flatten globals doesn't insert uses of globals that previously had no uses. This was the deeper cause of the issues I fixed in https://codereview.chromium.org/33233002/ and is therefore a better fix. (The problem was that StripDeadPrototypes was not stripping a variable that was actually dead because the bitcast constexpr inserted by FlattenGlobals referred to it.) I reverted most of that CL's changes, though not the comment and test cleanup. R=dschuff@chromium.org TEST= pnacl-clang++ pnacl/git/libcxx/test/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp -stdlib=libc++ Review URL: https://codereview.chromium.org/34843003 --- test/Transforms/NaCl/globalcleanup.ll | 8 -------- 1 file changed, 8 deletions(-) (limited to 'test') diff --git a/test/Transforms/NaCl/globalcleanup.ll b/test/Transforms/NaCl/globalcleanup.ll index 7e1fa3d8a5..5f976e22da 100644 --- a/test/Transforms/NaCl/globalcleanup.ll +++ b/test/Transforms/NaCl/globalcleanup.ll @@ -16,14 +16,6 @@ ; CHECK: @weak_gv = internal global @weak_gv = weak global i32 0 -; Libc++'s declarations of iostream values are purely ``extern`` and -; unused otherwise which led to a bug when used as ``(void)std::clog``: -; the global would survive as ``external global`` post-link but without -; a proper definition. Global cleanup should take care of it. -; GV-NOT: ostream -%"class.fake_ostream" = type { i32 } -@ostream = external global %"class.fake_ostream" - ; CHECK: define void @_start define void @_start() { ret void -- cgit v1.2.3-18-g5258