[PATCH] D43006: MC: store defined macros in MCContext

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 08:56:51 PST 2018


Roger via Phabricator <reviews at reviews.llvm.org> writes:

> Index: test/MC/AsmParser/inline_macro_duplication.ll
> ===================================================================
> --- /dev/null
> +++ test/MC/AsmParser/inline_macro_duplication.ll
> @@ -0,0 +1,9 @@
> +; RUN: not llc < %s 2>&1 | FileCheck %s
> +
> +define void @test() #0 {
> +entry:

Nit, you don't need the "#0" or the "entry:".

> Index: include/llvm/MC/MCAsmMacro.h
> ===================================================================
> --- /dev/null
> +++ include/llvm/MC/MCAsmMacro.h
> @@ -0,0 +1,42 @@
> +//===- MCAsmMacro.h - Assembly Macros ---------------------------*- C++ -*-===//
> +//
> +//                     The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +
> +#ifndef LLVM_MC_MCASMMACRO_H
> +#define LLVM_MC_MCASMMACRO_H
> +
> +#include "llvm/MC/MCParser/MCAsmLexer.h"
> +#include <cstddef>
> +#include <cstdint>
> +#include <string>
> +#include <vector>
> +
> +namespace llvm {
> +
> +  struct MCAsmMacroParameter {
> +    StringRef Name;
> +    std::vector<AsmToken> Value;
> +    bool Required = false;
> +    bool Vararg = false;
> +
> +    MCAsmMacroParameter() = default;
> +  };

Please clang-format this file. We normally don't indent inside
namespaces.

LGTM with those changes.

Thanks,
Rafael


More information about the llvm-commits mailing list