================ @@ -0,0 +1,84 @@ +//===-- llvm/Target/TargetVerifier.h - LLVM IR Target Verifier --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines target verifier interfaces that can be used for some +// validation of input to the system, and for checking that transformations +// haven't done something bad. In contrast to the Verifier or Lint, the +// TargetVerifier looks for constructions invalid to a particular target +// machine. +// +// To see what specifically is checked, look at TargetVerifier.cpp or an +// individual backend's TargetVerifier. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TARGET_VERIFIER_H +#define LLVM_TARGET_VERIFIER_H + +#include "llvm/IR/Module.h" +#include "llvm/IR/PassManager.h" +#include "llvm/TargetParser/Triple.h" + +namespace llvm { + +class Function; + +class TargetVerifierPass : public PassInfoMixin<TargetVerifierPass> { +public: + virtual PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM) = 0; +}; + +class TargetVerify { +protected: + void WriteValues(ArrayRef<const Value *> Vs) { + for (const Value *V : Vs) { ---------------- jofrn wrote:
It can be written to anywhere, but `MessagesStr` is currently being written to `dbgs()`. https://github.com/llvm/llvm-project/blob/de38b78d2bd598c6168c6235d408726c68251f4c/llvm/lib/Target/AMDGPU/AMDGPUTargetVerifier.cpp#L109 https://github.com/llvm/llvm-project/pull/123609 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits