[llvm] r196526 - Fix minor GCC warnings.
Yuchen Wu
yuchenericwu at hotmail.com
Thu Dec 5 12:07:56 PST 2013
Hi,
It looks like the FunctionBlockSetType typedef is needed for the DEBUG section:
952 DEBUG({
953 // Crash at the end so we get all of the debugging output first.
954 bool BadFunc = false;
955 FunctionBlockSetType FunctionBlockSet;
956 for (MachineFunction::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
957 FunctionBlockSet.insert(FI);
958
959 for (BlockChain::iterator BCI = FunctionChain.begin(),
960 BCE = FunctionChain.end();
961 BCI != BCE; ++BCI)
962 if (!FunctionBlockSet.erase(*BCI)) {
963 BadFunc = true;
964 dbgs() << "Function chain contains a block not in the function!\n"
965 << " Bad block: " << getBlockName(*BCI) << "\n";
966 }
967
968 if (!FunctionBlockSet.empty()) {
969 BadFunc = true;
970 for (FunctionBlockSetType::iterator FBI = FunctionBlockSet.begin(),
971 FBE = FunctionBlockSet.end();
972 FBI != FBE; ++FBI)
973 dbgs() << "Function contains blocks never placed into a chain!\n"
974 << " Bad block: " << getBlockName(*FBI) << "\n";
975 }
976 assert(!BadFunc && "Detected problems with the block placement.");
977 });
This is now breaking the compile. Would you mind fixing/reverting this commit?
Thanks,
-Yuchen
----------------------------------------
> Subject: [llvm] r196526 - Fix minor GCC warnings.
> Date: Thu, 5 Dec 2013 19:37:37 +0000
> To: llvm-commits at cs.uiuc.edu
> From: Matthew.Arsenault at amd.com
>
> Author: arsenm
> Date: Thu Dec 5 13:37:36 2013
> New Revision: 196526
>
> URL: http://llvm.org/viewvc/llvm-project?rev=196526&view=rev
> Log:
> Fix minor GCC warnings.
>
> Unused typedefs and unused variables.
>
> Modified:
> llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
> llvm/trunk/tools/lli/ChildTarget/ChildTarget.cpp
> llvm/trunk/tools/lli/RemoteTargetExternal.cpp
>
> Modified: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp?rev=196526&r1=196525&r2=196526&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp Thu Dec 5 13:37:36 2013
> @@ -949,7 +949,6 @@ void MachineBlockPlacement::buildCFGChai
> BlockChain &FunctionChain = *BlockToChain[&F.front()];
> buildChain(&F.front(), FunctionChain, BlockWorkList);
>
> - typedef SmallPtrSet<MachineBasicBlock *, 16> FunctionBlockSetType;
> DEBUG({
> // Crash at the end so we get all of the debugging output first.
> bool BadFunc = false;
>
> Modified: llvm/trunk/tools/lli/ChildTarget/ChildTarget.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/ChildTarget/ChildTarget.cpp?rev=196526&r1=196525&r2=196526&view=diff
> ==============================================================================
> --- llvm/trunk/tools/lli/ChildTarget/ChildTarget.cpp (original)
> +++ llvm/trunk/tools/lli/ChildTarget/ChildTarget.cpp Thu Dec 5 13:37:36 2013
> @@ -99,6 +99,7 @@ void LLIChildTarget::handleAllocateSpace
> // Read and verify the message data size.
> uint32_t DataSize;
> int rc = ReadBytes(&DataSize, 4);
> + (void)rc;
> assert(rc == 4);
> assert(DataSize == 8);
>
>
> Modified: llvm/trunk/tools/lli/RemoteTargetExternal.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/RemoteTargetExternal.cpp?rev=196526&r1=196525&r2=196526&view=diff
> ==============================================================================
> --- llvm/trunk/tools/lli/RemoteTargetExternal.cpp (original)
> +++ llvm/trunk/tools/lli/RemoteTargetExternal.cpp Thu Dec 5 13:37:36 2013
> @@ -59,6 +59,7 @@ void RemoteTargetExternal::stop() {
>
> void RemoteTargetExternal::SendAllocateSpace(uint32_t Alignment, uint32_t Size) {
> int rc;
> + (void)rc;
> uint32_t MsgType = (uint32_t)LLI_AllocateSpace;
> rc = WriteBytes(&MsgType, 4);
> assert(rc == 4 && "Error writing message type.");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list