[llvm-commits] [llvm] r77714 - /llvm/trunk/unittests/MC/AsmStreamerTest.cpp
Benjamin Kramer
benny.kra at googlemail.com
Fri Jul 31 12:12:33 PDT 2009
Author: d0k
Date: Fri Jul 31 14:12:33 2009
New Revision: 77714
URL: http://llvm.org/viewvc/llvm-project?rev=77714&view=rev
Log:
Adjust unit test for the MCSection changes.
Modified:
llvm/trunk/unittests/MC/AsmStreamerTest.cpp
Modified: llvm/trunk/unittests/MC/AsmStreamerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/MC/AsmStreamerTest.cpp?rev=77714&r1=77713&r2=77714&view=diff
==============================================================================
--- llvm/trunk/unittests/MC/AsmStreamerTest.cpp (original)
+++ llvm/trunk/unittests/MC/AsmStreamerTest.cpp Fri Jul 31 14:12:33 2009
@@ -9,6 +9,7 @@
#include "gtest/gtest.h"
#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/raw_ostream.h"
@@ -45,14 +46,14 @@
TEST(AsmStreamer, Sections) {
StringAsmStreamer S;
- MCSection *Sec0 = S.getContext().GetSection("foo");
+ MCSection *Sec0 = MCSection::Create("foo", S.getContext());
S.getStreamer().SwitchSection(Sec0);
EXPECT_EQ(".section foo\n", S.getString());
}
TEST(AsmStreamer, Values) {
StringAsmStreamer S;
- MCSection *Sec0 = S.getContext().GetSection("foo");
+ MCSection *Sec0 = MCSection::Create("foo", S.getContext());
MCSymbol *A = S.getContext().CreateSymbol("a");
MCSymbol *B = S.getContext().CreateSymbol("b");
S.getStreamer().SwitchSection(Sec0);
@@ -73,7 +74,7 @@
TEST(AsmStreamer, Align) {
StringAsmStreamer S;
- MCSection *Sec0 = S.getContext().GetSection("foo");
+ MCSection *Sec0 = MCSection::Create("foo", S.getContext());
S.getStreamer().SwitchSection(Sec0);
S.getStreamer().EmitValueToAlignment(4);
S.getStreamer().EmitValueToAlignment(4, /*Value=*/12, /*ValueSize=*/2);
@@ -87,7 +88,7 @@
TEST(AsmStreamer, Org) {
StringAsmStreamer S;
- MCSection *Sec0 = S.getContext().GetSection("foo");
+ MCSection *Sec0 = MCSection::Create("foo", S.getContext());
S.getStreamer().SwitchSection(Sec0);
MCSymbol *A = S.getContext().CreateSymbol("a");
S.getStreamer().EmitLabel(A);
More information about the llvm-commits
mailing list